<!DOCTYPE html>
<html ng-app="web" ng-controller="mainCtrl">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
  <title>Kodo Browser</title>
  <script>
    const os = require('os');
    const path = require('path');
  </script>
  <link href="css/lib.css" rel="stylesheet">
  <link href="app.css" rel="stylesheet">
  <style>
    .isred {
      background-color: bisque !important;
    }
  </style>
</head>

<body>

  <div ui-view="">
    <section style="text-align:center;display:block;width:128px;margin:250px auto 0">
      <div class="loadEffect">
        <div>
          <span></span>
        </div>
        <div>
          <span></span>
        </div>
        <div>
          <span></span>
        </div>
        <div>
          <span></span>
        </div>
      </div>
    </section>
  </div>

  <toast-list></toast-list>

  <!-- Insert this line before script imports  -->
  <script>
    if (typeof module === 'object') {
      window.module = module;
      module = undefined;
    }
  </script>
  <script src="lib.js"></script>
  <!-- Insert this line after script imports -->
  <script>
    if (window.module) module = window.module;
  </script>

  <script src="templates.js"></script>
  <script>
    const {
      ipcRenderer,
      shell
    } = require('electron');
    var isDev = process.env.NODE_ENV == 'development';

    function openExternal(url) {
      // Open a URL in the default way
      shell.openExternal(url);
    }

    function openDevTools() {
      ipcRenderer.send('asynchronous', {
        key: 'openDevTools'
      });
    }

    var pkg = require('./package');

    var Global = {
      app: {
        id: 'kodo-browser',
        logo: 'icons/icon.png',
        version: pkg.version
      },
      i18n: require('./node/i18n'),
      domain: '@qiniu.com',
      config_path: path.join(os.homedir(), '.kodo-browser')
    };

    $(function () {
      $(document).on('dragover', function (ev) {
        ev.preventDefault();
        return false;
      })
      $(document).on('drop', function (ev) {
        ev.preventDefault();
        return false;
      })
    });
  </script>
  <script src="app.js"></script>

</body>

</html>
